(function () {

    "use strict";

    var api = {
        userInfoUrl: '/api/user/userInfo'
    };

    sm.controller('wx-center-cash-controller', ['$scope', '$http', function ($scope, $http){

        $scope.userInfo = {};
        $scope.getUser = function () {
            $http.get(api.userInfoUrl).success(function (res) {
                if (res.state) {
                    $scope.userInfo = res.data;
                }
            });
        };

        $scope.getUser();


        $scope.cashout = function () {
            location.href = '/center/cashout';
        };

        $scope.cashin = function () {
            location.href = '/center/cashin';
        };

        $scope.integral = function () {
            location.href = '/center/integral';
        };

    }]);
})();

